package com.aaa.commen.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @PackageName: com.aaa.entity
 * @ClassName: Result
 * @Description:
 * @author: 王嘉威
 * @Date: 2021/1/19 10:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private   Integer  code;
    private   String   message;
    private   Object   data;

    public static Result success(String message){
        return new Result(1,message,null);
    }
    public static Result success(Object data){
        return new Result(1,"success",data);
    }
    public static Result error(String message){
        return new Result(2,message,null);
    }
}